#include "aed_particlecomp.h"

AED_ParticleComp::AED_ParticleComp()
{
    m_enabled = false;
}

AED_ParticleComp& AED_ParticleComp::operator =(const AED_ParticleComp &comp){
    m_enabled = comp.m_enabled;
    return *this;
}

bool AED_ParticleComp::IsEnabled(){
    return m_enabled;
}

void AED_ParticleComp::SetEnabled(bool enabled){
    m_enabled = enabled;
}

void AED_ParticleComp::Save(QTextStream &file){
    if(!m_enabled)
        return;

    file << "   <component = Particle>" << endl;
    file << "   </component>" << endl;
}

void AED_ParticleComp::Save(QDomDocument &doc, QDomElement &pelem){
    if(!m_enabled)
        return;
    QDomElement elem = doc.createElement("component");
    elem.setAttribute("comptype","Particle");
    pelem.appendChild(elem);
}

void AED_ParticleComp::Load(QDomElement &celem){
    m_enabled = true;
}
